﻿using Commons.Commands.Results;
using Commons.Models.Users;
using Commons.Services.Users;
using System.Collections.Generic;

namespace Commons.Commands
{
    public class GetUserAccountsCommand : Command
    {
        //injected
        public IUserService UserService { set; protected get; }

        public override OperationResult Execute()
        {
            List<User> users = UserService.GetAllUsers();
            Dictionary<string, object> info = new Dictionary<string, object>();
            info["users"] = users;
            OperationResult result = new OperationResult(true, info);
            return result;
        }
    }
}
